﻿
using System;
using System.Data;
using System.Data.SqlClient;
namespace Model
{
	
	/// <summary>	 
	/// 支付方式种类
	/// </summary>
	public class PaymentsMethod
	{ 
		#region PaymentsMethod
		/// <summary>
		/// 
		/// </summary>
		public PaymentsMethod()
		{
		}
		/// <summary>	 
		/// 
		/// </summary>
		public PaymentsMethod(Int32 pId)
		{
			this.pId = pId;
		
		}
		/// <summary>	 
		/// 
		/// </summary>		
		public PaymentsMethod(DataRow dr)
		{
			int.TryParse(Convert.ToString(dr["pId"]),out pId);
			this.pName = Convert.ToString(dr["pName"]);
			this.pCode = Convert.ToString(dr["pCode"]);
			this.logoPath = Convert.ToString(dr["logoPath"]);
			this.additionalFee = Convert.ToDecimal(dr["additionalFee"]);
			this.extVar = Convert.ToString(dr["extVar"]);
			this.account = Convert.ToString(dr["account"]);
			this.description = Convert.ToString(dr["description"]);
			this.isInvocation = Convert.ToInt16(dr["isInvocation"]);
			this.accountKey = Convert.ToString(dr["accountKey"]);
			this.merchantNo = Convert.ToString(dr["merchantNo"]);
			int.TryParse(Convert.ToString(dr["gid"]),out gid);
			this.gUrl = Convert.ToString(dr["gUrl"]);
			if(dr["inTime"] != DBNull.Value)
				this.inTime = Convert.ToDateTime(dr["inTime"]);
			this.tUrl = Convert.ToString(dr["tUrl"]);
			
		}
		#endregion
		
		
		#region PId
		private Int32 pId;
		/// <summary>	 
		/// 
		/// AutoInc
		/// PK
		/// </summary>
		public Int32 PId
		{
			get{ return pId; }
			set{ pId= value; }
		}
		#endregion
		
		#region PName
		private System.String pName;
		/// <summary>	 
		/// 支付名字
		/// </summary>
		public System.String PName
		{
			get{ return pName; }
			set{ pName= value; }
		}
		#endregion
		
		#region PCode
		private System.String pCode;
		/// <summary>	 
		/// 编号
		/// </summary>
		public System.String PCode
		{
			get{ return pCode; }
			set{ pCode= value; }
		}
		#endregion
		
		#region LogoPath
		private System.String logoPath;
		/// <summary>	 
		/// LOGO
		/// </summary>
		public System.String LogoPath
		{
			get{ return logoPath; }
			set{ logoPath= value; }
		}
		#endregion
		
		#region AdditionalFee
		private Decimal additionalFee;
		/// <summary>	 
		/// 手续费
		/// </summary>
		public Decimal AdditionalFee
		{
			get{ return additionalFee; }
			set{ additionalFee= value; }
		}
		#endregion
		
		#region ExtVar
		private System.String extVar;
		/// <summary>	 
		/// 
		/// </summary>
		public System.String ExtVar
		{
			get{ return extVar; }
			set{ extVar= value; }
		}
		#endregion
		
		#region Account
		private System.String account;
		/// <summary>	 
		/// 帐户
		/// </summary>
		public System.String Account
		{
			get{ return account; }
			set{ account= value; }
		}
		#endregion
		
		#region Description
		private System.String description;
		/// <summary>	 
		/// 描述
		/// </summary>
		public System.String Description
		{
			get{ return description; }
			set{ description= value; }
		}
		#endregion
		
		#region IsInvocation
		private Int16 isInvocation;
		/// <summary>	 
		/// 是否默认
		/// </summary>
		public Int16 IsInvocation
		{
			get{ return isInvocation; }
			set{ isInvocation= value; }
		}
		#endregion
		
		#region AccountKey
		private System.String accountKey;
		/// <summary>	 
		/// 密钥
		/// </summary>
		public System.String AccountKey
		{
			get{ return accountKey; }
			set{ accountKey= value; }
		}
		#endregion
		
		#region MerchantNo
		private System.String merchantNo;
		/// <summary>	 
		/// 商户号
		/// </summary>
		public System.String MerchantNo
		{
			get{ return merchantNo; }
			set{ merchantNo= value; }
		}
		#endregion
		
		#region Gid
		private Int32 gid;
		/// <summary>	 
		/// 
		/// </summary>
		public Int32 Gid
		{
			get{ return gid; }
			set{ gid= value; }
		}
		#endregion
		
		#region GUrl
		private System.String gUrl;
		/// <summary>	 
		/// 获取跳转支付URL
		/// </summary>
		public System.String GUrl
		{
			get{ return gUrl; }
			set{ gUrl= value; }
		}
		#endregion
		
		#region InTime
		private DateTime inTime;
		/// <summary>	 
		/// 
		/// </summary>
		public DateTime InTime
		{
			get{ return inTime; }
			set{ inTime= value; }
		}
		#endregion
		
		#region TUrl
		private System.String tUrl;
		/// <summary>	 
		/// 跳转支付URL
		/// </summary>
		public System.String TUrl
		{
			get{ return tUrl; }
			set{ tUrl= value; }
		}
		#endregion

	}
}
